Problem: A figure is constructed from unit cubes.  Each cube shares at least one face with another cube.   What is the minimum number of cubes needed to build a figure with the front and side views shown? [asy]
/* AMC8 2003 #15 Problem */
draw((0,0)--(2,0)--(2,1)--(1,1)--(1,2)--(0,2)--cycle);
draw((0,1)--(1,1)--(1,0));
draw((4,0)--(6,0)--(6,2)--(5,2)--(5,1)--(4,1)--cycle);
draw((5,0)--(5,1)--(6,1));
label(scale(0.8)*"FRONT", (1, 0), S);
label(scale(0.8)*"SIDE", (5,0), S);
[/asy]
There are only two ways to construct a solid from three cubes so that each cube shares a face with at least one other: [asy]
/* AMC8 2003 #15, p.1 Solution */
draw((0,0)--(3,0)--(3.5,.5)--(3.5,1.5)--(.5,1.5)--(0,1)--cycle);
draw((0,1)--(3,1));
draw((1,0)--(1,1)--(1.5,1.5));
draw((2,0)--(2,1)--(2.5,1.5));
draw((3,0)--(3,1)--(3.5,1.5));
draw((7,0)--(9,0)--(9.5,.5)--(9.5,1.5)--(8.5,1.5)--(8.5,2.5)--(7.5,2.5)--(7,2)--cycle);
draw((7,1)--(9,1));
draw((8,2)--(8,0));
draw((8,1)--(8.5,1.5));
draw((7,2)--(8,2)--(8.5,2.5));
draw((9,0)--(9,1)--(9.5,1.5));
label("and", (5,1));
[/asy] Neither of these configurations has both the front and side views shown.  The four-cube configuration has the required front and side views.  Thus at least $\boxed{4}$ cubes are necessary. [asy]
/* AMC8 2003 #15, p.2 Solution */
pen p = linetype("4 4");
pen q = linewidth(1)+black;
pen c = red;

filldraw((72,162)--(144,108)--(144,54)--(72,108)--cycle, c, q);
filldraw((144,54)--(216,108)--(216,162)--(144,108)--cycle, c, q);
filldraw((72,162)--(144,216)--(216,162)--(144,108)--cycle, c, q);

/** Left Box **/
draw((144,54)--(72,0)--(0,54)--(0, 108)--(72,54)--(144,108), p);
draw((72,0)--(72,54), p);
draw((0,108)--(72,162), p);

/** Right box **/
draw((144,54)--(216,0)--(288,54)--(288,108)--(216,54)--(144,108), p);
draw((216,0)--(216,54), p);
draw((216, 162)--(288,108), p);

/** Top box **/
draw((144,108)--(144,162)--(72,216)--(144,270)--(216,216)--(144,162), p);
draw((72,162)--(72,216), p);
draw((216,162)--(216,216), p);
[/asy]